<!DOCTYPE html>
<html>

<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="renderer" content="webkit">
    <title>{$system.sitename}后台管理中心 - 内容管理 - 单页管理</title>
    
    
</head>

<body>

            <div class="row wrapper border-bottom white-bg page-heading">
                <div class="col-lg-10">
                    <h2>内容管理</h2>
                    <ol class="breadcrumb">
                        <li>
                            <a href="__MODULE__/Index/index">主页</a>
                        </li>
                        <li>
                            <a href="__MODULE__/News/index">内容管理</a>
                        </li>
                        <li>
                            <a href="__MODULE__/News/about">单页管理</a>
                        </li>
                        <li>
                            <strong>添加内容</strong>
                        </li>
                    </ol>
                </div>
            </div>
            <div class="wrapper wrapper-content animated fadeInRight">
                <div class="row">
                    <div class="col-lg-12">
                        <div class="ibox float-e-margins">
                            <div class="ibox-title">
                                <h5>添加内容</h5>
                            </div>
                            <div class="ibox-content">
                                <form  role="form" id="form" method="post"  action="__MODULE__/News/save_about" class="form-horizontal" enctype="multipart/form-data" />
                                    <div class="form-group">
                                        <label class="col-sm-2 control-label">标题</label>
                                        <div class="col-sm-10">
                                            <input type="text" class="form-control" name="n_title"   placeholder="请输入标题">
                                        </div>
                                    </div>
                                    <div class="hr-line-dashed"></div>
                                    
                                    <div class="form-group">
                                        <label class="col-sm-2 control-label">类别</label>

                                        <div class="col-sm-10">
                                            <select class="form-control m-b" name="cate_id">
                                            <volist name="newscate" id="c">
                                                <option value="{$c.c_id}">{$c.c_title}</option>
                                            </volist>    
                                            </select>
                                        </div>
                                    </div>
                                    <div class="hr-line-dashed"></div>
                                    
                                    <div class="form-group">
                                        <label class="col-sm-2 control-label">图片</label>
                                        <div class="col-sm-10">
                                        <input  type="file" name="n_img" id="exampleInputFile"  >
                                        <span class="help-block m-b-none">默认图片尺寸为：700*525 </span>
                                        </div>
                                    </div>
                                    <div class="hr-line-dashed"></div>

                                    <div class="form-group">
                                        <label class="col-sm-2 control-label">内容</label>
                                        <div class="col-sm-10">
                                          <textarea id="editor_id" class="form-control"  name="n_content"  style="height:400px;">
                                          </textarea>
                                        </div>
                                    </div>
                                    <div class="hr-line-dashed"></div>


                                  <div class="form-group" id="data_1">
                                      <label class="col-sm-2 control-label">发布日期</label>
                                      <div class="col-sm-10 input-group date">
                                          <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                                          <input type="text" class="form-control" name="n_date">
                                      </div>
                                  </div>
 

                                    <div class="form-group">
                                        <div class="col-sm-4 col-sm-offset-2">
                                        <input type="hidden" name="n_type" value="0">
                                            <button class="btn btn-primary" type="submit">保存内容</button>
                                            <button class="btn btn-white" type="reset">取消</button>
                                        </div>
                                    </div>
                                </form>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            
    <!-- Script kindeditor -->
    <script charset="utf-8" src="__PUBLIC__/kindeditor/kindeditor-all-min.js"></script>
	<script charset="utf-8" src="__PUBLIC__/kindeditor/lang/zh-CN.js"></script>
    <script>
	KindEditor.options.filterMode = false;

	KindEditor.ready(function(K) {
			window.editor = K.create('#editor_id');
	});
    </script>
    <!-- Jquery Validate -->
    <script src="__PUBLIC__/js/plugins/validate/jquery.validate.min.js"></script>
    <script src="__PUBLIC__/js/plugins/validate/messages_zh.min.js"></script>
        <!-- Data picker -->
    <script src="__PUBLIC__/js/plugins/datapicker/bootstrap-datepicker.js"></script>
    
        <script>
		//时间
		 $(document).ready(function () {

            $('#data_1 .input-group.date').datepicker({
                todayBtn: "linked",
                keyboardNavigation: false,
                forceParse: false,
                calendarWeeks: true,
                autoclose: true
            });
		});
//验证
    $().ready(function () {
        // validate the comment form when it is submitted

        // validate signup form on keyup and submit
        $("#form").validate({
            rules: {
                n_title: {
                     required:true,
					 minlength:4
                    },
         cate_id: {
                     required:true,
                    },
           n_content: {
                    required: true,
                },

            },
        });


    });
    </script>  
    </body>
</html>
